package shemes;

import java.awt.Point;
import java.util.ArrayList;

import gui.*;
import components.*;

public class Sistem {

    private static GuiScheme gui;

    public static GuiScheme getGui() {
        return gui;
    }

    public static void init() {
    }

    public static void connect() {
    }

    public static void gui() {
        GuiLine line; // Pomocna promenljiva
        gui = new GuiScheme("src/images/SYSTEM.png");
        ArrayList<ArrayList<Point>> sections;
        ArrayList<Point> points;

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(118, 78));
        points.add(new Point(394, 78));
        sections.add(points);
        points = new ArrayList<Point>();
        points.add(new Point(118, 80));
        points.add(new Point(394, 80));
        sections.add(points);
        line = new GuiLine(sections, Bus1.ABUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(118, 113));
        points.add(new Point(394, 113));
        sections.add(points);
        points = new ArrayList<Point>();
        points.add(new Point(118, 115));
        points.add(new Point(394, 115));
        sections.add(points);
        line = new GuiLine(sections, Bus1.DBUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(119, 149));
        points.add(new Point(394, 149));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTRDBUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(120, 166));
        points.add(new Point(394, 166));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTWRBUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(119, 183));
        points.add(new Point(394, 183));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTFCBUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(274, 249));
        points.add(new Point(274, 81));
        sections.add(points);
        points = new ArrayList<Point>();
        points.add(new Point(276, 249));
        points.add(new Point(276, 81));
        sections.add(points);
        line = new GuiLine(sections, Bus1.ABUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(300, 249));
        points.add(new Point(300, 116));
        sections.add(points);
        points = new ArrayList<Point>();
        points.add(new Point(302, 249));
        points.add(new Point(302, 116));
        sections.add(points);
        line = new GuiLine(sections, Bus1.DBUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(327, 249));
        points.add(new Point(327, 150));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTRDBUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(345, 249));
        points.add(new Point(345, 167));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTWRBUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(362, 249));
        points.add(new Point(362, 184));
        sections.add(points);
        line = new GuiLine(sections, Bus1.NOTFCBUS());
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(197, 265));
        points.add(new Point(222, 265));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(197, 279));
        points.add(new Point(222, 279));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(197, 293));
        points.add(new Point(222, 293));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(197, 307));
        points.add(new Point(222, 307));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(197, 321));
        points.add(new Point(222, 321));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(197, 335));
        points.add(new Point(222, 335));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(197, 349));
        points.add(new Point(222, 349));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(422, 331));
        points.add(new Point(398, 331));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(423, 262));
        points.add(new Point(398, 262));
        sections.add(points);
        line = new GuiLine(sections, new Pin(false));
        gui.addLine(line);

        sections = new ArrayList<ArrayList<Point>>();
        points = new ArrayList<Point>();
        points.add(new Point(398, 281));
        points.add(new Point(423, 281));
        sections.add(points);
        line = new GuiLine(sections, Bus1.hack());
        gui.addLine(line);

        //LABELE:
        gui.addLabel(new GuiLabel(190, 75, Bus1.ABUS()));
        gui.addLabel(new GuiLabel(190, 110, Bus1.DBUS()));
    }
}
